import KZJRequest from '../index'
import { TRequestDefaultResult } from '../type'

enum Music {
  SongLyric = '/lyric', // 歌词
  SongComment = '/comment/music', // 评论
  SimiSong = '/simi/song' // 相似歌曲
}

export function getMusicLyric(id: number) {
  return KZJRequest.get<TRequestDefaultResult>({
    url: Music.SongLyric,
    params: { id }
  })
}

export function getMusicComment(id: number, offset = 0, limit = 30) {
  return KZJRequest.get<TRequestDefaultResult>({
    url: Music.SongComment,
    params: { id, limit, offset }
  })
}
export function getMusicSimi(id: number) {
  return KZJRequest.get<TRequestDefaultResult>({
    url: Music.SimiSong,
    params: { id }
  })
}
